using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Text.RegularExpressions;

namespace WebApplication
{
    /// <summary>
    /// Extensions for the HtmlControl
    /// </summary>
    public static class HtmlControlExtensions
    {
        /// <summary>
        /// Shows the HTML control.
        /// </summary>
        public static void Show(this HtmlControl control)
        {
            if (control == null) throw new ArgumentNullException("control");

            control.Style["display"] = "block";
        }

        /// <summary>
        /// Hide the HTML control.
        /// </summary>
        public static void Hide(this HtmlControl control)
        {
            if (control == null) throw new ArgumentNullException("control");

            control.Style["display"] = "none";
        }
    }
}
